<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Tfidf_model extends CI_Model{
     	function __construct()
	{
		parent:: __construct();
		//melakukan load database apabila kelas ini dipanggil
		$this->load->database();
	}
        /*
         * result or count
         */
        function data_kasus($pilih){
             $this->db->select('kasus');
             $this->db->from('data_kasus');
             if($pilih=="result"){
             $data_kasus = $this->db->get();
             return $data_kasus;
             } else if($pilih=="count"){
             $data_kasus=$this->db->count_all_results();
                  return $data_kasus;
             }else{
                  echo "wrong. parameter: result=> array database data_kasus, =>count=>jumlah dokumen (D)";
             }
        }
}